<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:84:"D:\phpstudy\PHPTutorial\WWW\farm\farm_sink/application/index\view\reals\shiming.html";i:1569291497;s:82:"D:\phpstudy\PHPTutorial\WWW\farm\farm_sink/application/index\view\common\head.html";i:1555643468;}*/ ?>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>农厂汇小程序管理中心</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="__STATIC__/css/font.css"> 
	<link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" /> 
    <link rel="stylesheet" href="__STATIC__/css/xadmin.css">
    <link href="__STATIC__/lib/layui/css/layui.css" rel="stylesheet">
    <script type="text/javascript" src="__STATIC__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__STATIC__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__STATIC__/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/css">
      #fff{
        border: red solid 1px;
      }
    </script>
  </head>
  
<style>
</style>
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href=" <?php echo url('index/index/welcome'); ?>">首页</a>
        <a href="">演示</a>
        <a href="">
          <cite>实名认证</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="<?php echo url('reals/shiming'); ?>" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
           <!-- <div class="layui-input-inline">
                <select name="cateid">
                    <option value="">搜索关键词</option>
                    <option value="uname">姓名</option>
                    <option value="phone">手机号码</option>
                    <option value="f_user.uid">用户id</option>
					<option value="f_real.rid">认证id</option>
                </select>
            </div>

            <input type="text" name="Key"  placeholder="请输入关键词" autocomplete="off" class="layui-input">-->
            <input type="text" name="uid" value="<?php echo (\think\Request::instance()->get('uid') !== ''?\think\Request::instance()->get('uid'):''); ?>"  placeholder="用户id" autocomplete="off" class="layui-input">
            <input type="text" name="phone" value="<?php echo (\think\Request::instance()->get('phone') !== ''?\think\Request::instance()->get('phone'):''); ?>"  placeholder="手机号" autocomplete="off" class="layui-input">
            <input type="text" name="uname" value="<?php echo (\think\Request::instance()->get('uname') !== ''?\think\Request::instance()->get('uname'):''); ?>"  placeholder="姓名" autocomplete="off" class="layui-input" >
           <span>提交时间</span><input class="layui-input" placeholder="开始日" name="datemin" id="start" value="<?php echo (\think\Request::instance()->get('datemin') !== ''?\think\Request::instance()->get('datemin'):''); ?>">至
            <input class="layui-input" placeholder="截止日" name="datemax" id="end"  value="<?php echo (\think\Request::instance()->get('datemax') !== ''?\think\Request::instance()->get('datemax'):''); ?>">
            <input type="submit" name="sub" class="layui-btn" value="开始搜索" lay-submit="" lay-filter="sreach">
        </form>
    </div>
    <xblock>
        <!--<a href="<?php echo url('index/admin/add'); ?>" class="layui-btn"><i class="layui-icon"></i>添加</a>-->
		<a href="attest" class="layui-btn layui-bg-orange">实名认证<i class="iconfont"></i><i class="iconfont">&#xe6ae;</i></a>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>NO</th>
            <th>用户id</th>
            <th>头像</th>
            <th>手机号码</th>
            <th>姓名</th>
            <th>身份证号</th>
            <th>身份证正面</th>
            <th>身份证反面</th>
            <th>套餐</th>
            <th>支付费用</th>
            <th>提交时间</th>
            <th>认证状态</th>
			<th>失败原因</th>
            <th colspan="2">操作</th>
		</tr>
	
        </thead>
        <tbody>
        <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$res): $mod = ($i % 2 );++$i;?>
                <tr>
            <td><?php echo $key+1; ?></td>
            <td><?php echo $res['uid']; ?></td>
            <td><?php if($res['avatars_img']==''): ?><img src="<?php echo $res['head_portrait']; ?>" height="40"><?php else: ?><img src="/upload/portrait/<?php echo $res['avatars_img']; ?>" width="40"><?php endif; ?></td>
            <td><?php echo $res['phone']; ?></td>
            <td><?php echo $res['uname']; ?></td>
            <td><?php echo $res['card']; ?></td>
            <td><img src="/upload/real/<?php echo $res['front_img']; ?>"  height="50"></td>
            <td>
			  <div class="gallery">
			    <div>
					<img src="/upload/real/<?php echo $res['reverse_img']; ?>" height="50">
				</div>
			  </div>
			</td>
            <td class="td-statu1s"><?php echo $res['phase_time']; ?>个月</td>
            <td class="td-stat1us"><?php echo $res['price']; ?>元</td>
            <td class="t1d-status"><?php echo $res['s_createtime']; ?></td>
             <td class="td-status">
              <span class="layui-btn layui-btn-normal layui-btn-disabled layui-btn-mini"><?php if($res['rflg']==4 ||$res['tid']!=0&&$res['rflg']==0): ?> 认证中 <?php endif; if($res['rflg']==1): ?> 成功 <?php endif; if($res['rflg']==2): ?> 修改中 <?php endif; if($res['rflg']==3): ?> 过期<?php endif; if($res['rflg']==0&&$res['tid']==0): ?> 未认证 <?php endif; ?></span></td>
			<td class="t1d-status"><?php echo $res['Reason']; ?></td>
            <td class="td-manage" colspan="2">
			<?php if($res['rflg']==4): ?> 
              <a onclick="member_stop(this,'<?php echo $res['rid']; ?>')" href="javascript:;"  title="通过">
                <i class="layui-icon">&#xe642;</i>通过
              </a>
              <a title="驳回" onclick="x_admin_show('原因','erro?id=<?php echo $res['rid']; ?>',600,400)"  href="javascript:;">
                <i class="layui-icon">&#xe640;</i>驳回
              </a>
			<?php endif; ?>
			<a title="查看详情" onclick="x_admin_show('查看详情','details?id=<?php echo $res['rid']; ?>',600,400)"  href="javascript:;">
                <i class="layui-icon">&#xe63c;</i>查看详情
              </a>
            </td>
        </tr>
          <?php endforeach; endif; else: echo "" ;endif; ?>
		<tr>
		<td colspan="14"><div class="page">
				<div>
					<?php echo $page; ?>
				</div>
		   </div>
		  </td>
	</tr>

	<!-- <tr> -->
		<!-- <td colspan="14"><div class="page"> -->
				<!-- <div> -->
					<!-- <?php echo $page; ?> -->
				<!-- </div> -->
		   <!-- </div> -->
		  <!-- </td> -->
	<!-- </tr> -->
	       
        </tbody>
    </table>
</div>
<script>
	//认证通过
	  function member_stop(obj,id){
		  layer.confirm('确认要通过吗？',function(index){
			$.ajax({
				url:'<?php echo URL("reals/suero"); ?>',
				data:{'id':id},
				type:'post',
				dataType:'json',
				success:function(msg){
				 if(msg.code==1){
					$(obj).attr('title','成功')
					location.reload();
				 }
				}
			  });
		  });
      }
	 layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
</script>
</body>

</html>